#include "LengthUnit.h"
#include <string>
#include <stdio.h>
#include "Length.h"
#include "iostream"

////////////////////////Public Declare////////////////////////////
LengthUnit::LengthUnit(unsigned int convertToAmountFactor, const char* name, const LengthUnit* next ) 
  :Unit(convertToAmountFactor, name, next){

}
LengthUnit& LengthUnit::getInch(){
  static LengthUnit Inch(1, "INCH", 0);
  return Inch;
}
LengthUnit& LengthUnit::getFeet(){
  static LengthUnit Feet(12, "FEET", &getInch());
  return Feet;
}
LengthUnit& LengthUnit::getYard(){
  static LengthUnit Yard(3*12, "YARD", &getFeet());
  return Yard;
}
LengthUnit& LengthUnit::getMile(){
  static LengthUnit Mile(3*12*1760, "MILE", &getYard());
  return Mile;
}



